home *** CD-ROM | disk | FTP | other *** search
/ X User Tools / X User Tools (O'Reilly and Associates)(1994).ISO / sources / xfishtan / buildl.dr < prev    next >
Text File  |  1994-10-02  |  2KB  |  66 lines

  1. #!/bin/sh
  2. # uncomment the next line to see more of the build process
  3. #set -x
  4. # BUILD script provided by Ready-to-Run Software, Inc.
  5. # Copyright 1994 Ready-to-Run Software, Inc. All Rights Reserved.
  6. BUILDDIR=`pwd`
  7. SOURCEDIR=${SOURCEDIR-/cdrom/SOURCES}
  8. if test ! -d $SOURCEDIR ; then 
  9.    cd `dirname $0`/..; SOURCEDIR=`pwd`
  10.    echo Assuming SOURCEDIR is $SOURCEDIR
  11.    cd $BUILDDIR
  12. fi
  13. INSTALLDIR=${INSTALLDIR-/usr/local}
  14. INSTALLSHAREDIR=${INSTALLSHAREDIR-/usr/local/share}
  15. if test "$1" != ""; then 
  16.    MACHINE=$1
  17. fi
  18. if test "$MACHINE" = ""; then 
  19.    MACHINE=`$SOURCEDIR/../common/guess.\;1 `
  20.    echo "Assuming machine is $MACHINE"
  21. fi
  22. machine=$MACHINE
  23. echo Ignore any errors about directories already existing
  24. mkdir xfishtank
  25. mkdir -p $INSTALLDIR
  26. mkdir $INSTALLDIR/bin
  27. mkdir $INSTALLDIR/lib
  28. mkdir -p $INSTALLSHAREDIR
  29. mkdir $INSTALLSHAREDIR/man
  30. mkdir $INSTALLSHAREDIR/man/man1
  31. mkdir $INSTALLSHAREDIR/doc
  32. mkdir $INSTALLSHAREDIR/${SHAREPREFIX}bin
  33. mkdir $INSTALLSHAREDIR/${SHAREPREFIX}lib
  34. /bin/rm -f $BUILDDIR/zcat
  35. /bin/ln -s $SOURCEDIR/../$machine/bin/zcat.\;1 $BUILDDIR/zcat
  36.  
  37.  
  38. cd $BUILDDIR/xfishtank
  39. cat $SOURCEDIR/xfishtan/xfishtan.gz\;1 | $BUILDDIR/zcat -d -c | tar xvof -
  40. cd xfishtank
  41.  
  42. (sed -e "s;<installsharedir>;$INSTALLSHAREDIR;" -e "s;<prefix>;$SHAREPREFIX;" -e "s;<installdir>;$INSTALLDIR;"  $SOURCEDIR/xfishtan/rtr/xfishtan.\;1 | patch -p -s )
  43. test -f  $SOURCEDIR/xfishtan/$machine/xfishtan.\;1 &&( sed -e "s;<installsharedir>;$INSTALLSHAREDIR;" -e "s;<prefix>;$SHAREPREFIX;" -e "s;<installdir>;$INSTALLDIR;"  $SOURCEDIR/xfishtan/$machine/xfishtan.\;1 | patch -b .rtr -p -s )
  44.  
  45. xmkmf
  46. make
  47. cd fishtogif; xmkmf; make
  48. cd $SOURCEDIR/xfishtan/giftofish.\;1; xmkmf; make 
  49. cd $SOURCEDIR/xfishtan/gofish.\;1; xmkmf; make
  50. cd $SOURCEDIR/xfishtan/pcfshtofish.\;1; xmkmf; make
  51. cd $SOURCEDIR/xfishtan/rasttofish.\;1; xmkmf; make
  52. cd ..
  53.  
  54. if test "$RM" != "" ; then make install ; fi
  55. cd fishtogif;if test "$RM" != "" ; then  make install ; fi
  56. cd $SOURCEDIR/xfishtan/giftofish.\;1;if test "$RM" != "" ; then  make install ; fi
  57. cd $SOURCEDIR/xfishtan/gofish.\;1;if test "$RM" != "" ; then  make install ; fi
  58. cd $SOURCEDIR/xfishtan/pcfshtofish.\;1;if test "$RM" != "" ; then  make install ; fi
  59. cd $SOURCEDIR/xfishtan/rasttofish.\;1;if test "$RM" != "" ; then  make install ; cd .. ; fi
  60.  
  61. cd $BUILDDIR/xfishtank 
  62.  
  63.  
  64. cd $BUILDDIR
  65. if test "$RM" != "" ; then rm -rf $BUILDDIR/xfishtank ; fi
  66.